3.8.31 \(\int (c x)^m (a+b x)^n \, dx\) [731]

Optimal. Leaf size=52 \[ \frac {(c x)^{1+m} (a+b x)^n \left (1+\frac {b x}{a}\right )^{-n} \, _2F_1\left (1+m,-n;2+m;-\frac {b x}{a}\right )}{c (1+m)} \]

[Out]

(c*x)^(1+m)*(b*x+a)^n*hypergeom([-n, 1+m],[2+m],-b*x/a)/c/(1+m)/((1+b*x/a)^n)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {68, 66} \begin {gather*} \frac {(c x)^{m+1} (a+b x)^n \left (\frac {b x}{a}+1\right )^{-n} \, _2F_1\left (m+1,-n;m+2;-\frac {b x}{a}\right )}{c (m+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c*x)^m*(a + b*x)^n,x]

[Out]

((c*x)^(1 + m)*(a + b*x)^n*Hypergeometric2F1[1 + m, -n, 2 + m, -((b*x)/a)])/(c*(1 + m)*(1 + (b*x)/a)^n)

Rule 66

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^n*((b*x)^(m + 1)/(b*(m + 1)))*Hypergeometr
ic2F1[-n, m + 1, m + 2, (-d)*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[m] && (IntegerQ[n] || (GtQ[
c, 0] &&  !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0] && GtQ[-d/(b*c), 0])))

Rule 68

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Dist[c^IntPart[n]*((c + d*x)^FracPart[n]/(1 + d*(
x/c))^FracPart[n]), Int[(b*x)^m*(1 + d*(x/c))^n, x], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[m] &&  !Int
egerQ[n] &&  !GtQ[c, 0] &&  !GtQ[-d/(b*c), 0] && ((RationalQ[m] &&  !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0])) |
|  !RationalQ[n])

Rubi steps

\begin {align*} \int (c x)^m (a+b x)^n \, dx &=\left ((a+b x)^n \left (1+\frac {b x}{a}\right )^{-n}\right ) \int (c x)^m \left (1+\frac {b x}{a}\right )^n \, dx\\ &=\frac {(c x)^{1+m} (a+b x)^n \left (1+\frac {b x}{a}\right )^{-n} \, _2F_1\left (1+m,-n;2+m;-\frac {b x}{a}\right )}{c (1+m)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 48, normalized size = 0.92 \begin {gather*} \frac {x (c x)^m (a+b x)^n \left (1+\frac {b x}{a}\right )^{-n} \, _2F_1\left (1+m,-n;2+m;-\frac {b x}{a}\right )}{1+m} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c*x)^m*(a + b*x)^n,x]

[Out]

(x*(c*x)^m*(a + b*x)^n*Hypergeometric2F1[1 + m, -n, 2 + m, -((b*x)/a)])/((1 + m)*(1 + (b*x)/a)^n)

________________________________________________________________________________________

Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 5 in optimal.
time = 3.16, size = 39, normalized size = 0.75 \begin {gather*} \frac {a^n c^m x^{1+m} \text {hyper}\left [\left \{-n,1+m\right \},\left \{2+m\right \},\frac {b x \text {exp\_polar}\left [I \text {Pi}\right ]}{a}\right ]}{1+m} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

mathics('Integrate[(c*x)^m*(a + b*x)^n,x]')

[Out]

a ^ n c ^ m x ^ (1 + m) hyper[{-n, 1 + m}, {2 + m}, b x exp_polar[I Pi] / a] / (1 + m)

________________________________________________________________________________________

Maple [F]
time = 0.06, size = 0, normalized size = 0.00 \[\int \left (c x \right )^{m} \left (b x +a \right )^{n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*x)^m*(b*x+a)^n,x)

[Out]

int((c*x)^m*(b*x+a)^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x)^m*(b*x+a)^n,x, algorithm="maxima")

[Out]

integrate((b*x + a)^n*(c*x)^m, x)

________________________________________________________________________________________

Fricas [F]
time = 0.74, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x)^m*(b*x+a)^n,x, algorithm="fricas")

[Out]

integral((b*x + a)^n*(c*x)^m, x)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 1.52, size = 37, normalized size = 0.71 \begin {gather*} \frac {a^{n} c^{m} x x^{m} \Gamma \left (m + 1\right ) {{}_{2}F_{1}\left (\begin {matrix} - n, m + 1 \\ m + 2 \end {matrix}\middle | {\frac {b x e^{i \pi }}{a}} \right )}}{\Gamma \left (m + 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x)**m*(b*x+a)**n,x)

[Out]

a**n*c**m*x*x**m*gamma(m + 1)*hyper((-n, m + 1), (m + 2,), b*x*exp_polar(I*pi)/a)/gamma(m + 2)

________________________________________________________________________________________

Giac [F] N/A
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x)^m*(b*x+a)^n,x)

[Out]

Could not integrate

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int {\left (c\,x\right )}^m\,{\left (a+b\,x\right )}^n \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*x)^m*(a + b*x)^n,x)

[Out]

int((c*x)^m*(a + b*x)^n, x)

________________________________________________________________________________________